//
//  SecondViewController.m
//  UI27-Block
//
//  Created by 韩旭 on 16/8/19.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "SecondViewController.h"
@interface SecondViewController ()

@end

@implementation SecondViewController
- (void)dealloc {
    NSLog(@"释放了");
//    MRC下的block
    Block_release(_block);
    _block = nil;
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor orangeColor];
    self.title = @"我是一个标题";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回上一页" style:UIBarButtonItemStylePlain target:self action:@selector(返回按钮:)];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}
- (IBAction)返回按钮:(id)sender {
    self.block(self.title);
    [self.navigationController popViewControllerAnimated:YES];
}
@end